<div class="mui-content">
  <div class="memberbg">
    <div class="member">
      <img src>
      <p></p>
    </div>
  </div>
  <!--<ul class="menu">-->
    <!--<li class="qianbao"><a href=""><i class="iconfont">&#xe604;</i><p>钱包</p></a></li>-->
    <!--<li class="kaquan"><a href=""><i class="iconfont">&#xe631;</i><p>卡券</p></a></li>-->
    <!--<li class="qian"><a href=""><i class="iconfont">&#xe64f;</i><p>安安</p></a></li>-->
  <!--</ul>-->
  <div class="h10"></div>
  <ul class="mymember">
    <h2><span class="fl">我的订单</span><a href="/users/account/orders/" class="fr">全部订单<i class="iconfont">&#xe605;</i></a></h2>
    <li><i class="iconfont">&#xe62b;</i><p>待付款</p></li>
    <li><i class="iconfont">&#xe61f;</i><p>待发货</p></li>
    <li><i class="iconfont">&#xe64d;</i><p>待收货</p></li>
  </ul>
  <div class="h10"></div>
  <ul class="list-menu">
    <li>
      <a href="/user/address/" id="receive-addr">
        <span class="fl">收货地址</span>
        <i class="fr iconfont">&#xe605;</i>
      </a>
    </li>
    <li>
      <a href="/user/account/contact/">
        <span class="fl">联系我们</span>
      </a>
    </li>
    <!--<li>-->
      <!--<a href="/help/">-->
        <!--<span class="fl">帮助和反馈</span>-->
        <!--<i class="fr iconfont">&#xe605;</i>-->
      <!--</a>-->
    <!--</li>-->
  </ul>
</div>
<!--底部导航-->
<div class="jl"></div>
<nav class="mui-bar mui-bar-tab">
  <a class="mui-tab-item" href="/">
    <span class="mui-icon "><i class="iconfont">&#xe601;</i></span>
    <span class="mui-tab-label">首页</span>
  </a>
  <a class="mui-tab-item" href="/list">
    <span class="mui-icon mui-icon-list"></span>
    <span class="mui-tab-label">列表</span>
  </a>
  <a class="mui-tab-item" href="/cart">
    <span class="mui-icon"><i class="iconfont">&#xe600;</i></span>
    <span class="mui-tab-label">购物车</span>
  </a>
  <a class="mui-tab-item mui-active" href="/account">
    <span class="mui-icon"><i class="iconfont">&#xe654;</i></span>
    <span class="mui-tab-label">我的</span>
  </a>
</nav>
<script>
  $(function () {
    var img = sessionStorage.getItem('img');
    var nickname = sessionStorage.getItem('nickname');
    var openid = sessionStorage.getItem('openid');
    $('#receive-addr').attr('href', '/user/address/?openid='+openid);
    $('.member>img').attr('src', img);
    $('.member>p').text(nickname);
  })
  $('.mymember>li').click(function () {
    var status_text = $(this).children('p').text();
    var status = '';
    switch (status_text) {
      case '待付款':
          status = 5;
          break;
      case '待发货':
          status = 10;
          break;
      case '待收货':
          status = -1;
          break;
    }
    var url = '/users/account/orders/?openid='+sessionStorage.getItem('openid')+'&status='+status;
    window.location.href = url;
  })
</script>
